package Bankmanagement;

import java.util.List;

/**
 * BankingAPI Interface - Defines the contract for managing bank accounts and tasks.
 * @author ashongtical
 */
public interface BankingAPI {
    /**
     * Creates a new bank account with the specified details.
     * @param accountNumber The unique account number.
     * @param balance The initial balance.
     * @param annualInterestRate The annual interest rate (as a decimal, e.g., 0.05 for 5%).
     * @throws IllegalArgumentException If the account number already exists.
     */
    void createAccount(String accountNumber, double balance, double annualInterestRate);

    /**
     * Deposits an amount into the specified account.
     * @param accountNumber The account number.
     * @param amount The amount to deposit.
     * @throws IllegalArgumentException If the account is not found or amount is invalid.
     */
    void deposit(String accountNumber, double amount);

    /**
     * Withdraws an amount from the specified account.
     * @param accountNumber The account number.
     * @param amount The amount to withdraw.
     * @throws IllegalArgumentException If the account is not found or amount is invalid.
     * @throws IllegalStateException If the withdrawal would drop balance below minimum.
     */
    void withdraw(String accountNumber, double amount);

    /**
     * Retrieves details of the specified account.
     * @param accountNumber The account number.
     * @return The BankAccount object.
     * @throws IllegalArgumentException If the account is not found.
     */
    BankAccount getAccountDetails(String accountNumber);

    /**
     * Adds a task to the task manager.
     * @param task The task description (use '*' for high priority).
     */
    void addTask(String task);

    /**
     * Removes a task from the specified priority list.
     * @param priority The priority level ("high" or "low").
     * @param index The index of the task in the list.
     */
    void removeTask(String priority, int index);

    /**
     * Changes the priority of a task.
     * @param priority The current priority level ("high" or "low").
     * @param index The index of the task in the list.
     */
    void changePriority(String priority, int index);

    /**
     * Promotes a high-priority task to a higher position in the list.
     * @param index The index of the task to promote.
     */
    void promoteTask(int index);

    /**
     * Retrieves the list of high-priority tasks.
     * @return A copy of the high-priority tasks list.
     */
    java.util.ArrayList<String> getHighPriorityTasks();

    /**
     * Retrieves the list of low-priority tasks.
     * @return A copy of the low-priority tasks list.
     */
    java.util.ArrayList<String> getLowPriorityTasks();

    boolean accountExists(String number);

    List<String> getAllTasks();
}